load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "go_default_library",
    srcs = ["smbios.go"],
    importpath = "kubevirt.io/kubevirt/cmd/sidecars/smbios",
    visibility = ["//visibility:private"],
    deps = [
        "//pkg/virt-launcher/virtwrap/api:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//vendor/github.com/spf13/pflag:go_default_library",
    ],
)

go_binary(
    name = "onDefineDomain",
    embed = [":go_default_library"],
    visibility = ["//visibility:public"],
)

load(
    "@io_bazel_rules_docker//container:container.bzl",
    "container_image",
)

container_image(
    name = "example-hook-sidecar-image",
    architecture = select({
        "@io_bazel_rules_go//go/platform:linux_arm64": "arm64",
        "//conditions:default": "amd64",
    }),
    base = "//cmd/sidecars:sidecar-shim-image",
    directory = "/usr/bin/",
    entrypoint = ["/sidecar-shim"],
    files = [":onDefineDomain"],
    visibility = ["//visibility:public"],
)
